<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>placeholder的替代实现</title>
</head>
<body>
  <input type="text" id="t1" value="在这里输入字符..." onfocus="f()" onblur="b()">
  <script>
    var t1 = document.getElementById("t1");
    function f() {
      if (t1.value === "在这里输入字符...")
        t1.value = "";
    }
    function b() {
      if (t1.value === "")
        t1.value = "在这里输入字符...";
    }
  </script>
</body>
</html>